package com.chap9;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: bj910
 * Date:2023-03-25
 * Time: 4:45
 * To change this template use File | Settings | File Templates.
 */
public class ArrayListDemo {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("zhangsan");
        list.add("lisi");
        list.add("wangwu");
        //写完之后，进行读操作
        for (String str : list) {
            System.out.println(str);
        }
    }
}
